package com.hudson.common.domain.meta;

import java.util.Map;
import java.util.Objects;

/**
 * @Author: 渔小鲤
 * @DateTime: 2025/7/27 1:12
 **/
public class TopicQueueMap {

    /**
     *  broker名称
     */
    private String brokerName;

    /**
     *  对应队列数量
     */
    private Map<String,Integer> queueNumMap;

    public TopicQueueMap() {
    }

    public TopicQueueMap(String brokerName, Map<String, Integer> queueNumMap) {
        this.brokerName = brokerName;
        this.queueNumMap = queueNumMap;
    }

    public String getBrokerName() {
        return brokerName;
    }

    public void setBrokerName(String brokerName) {
        this.brokerName = brokerName;
    }

    public Map<String, Integer> getQueueNumMap() {
        return queueNumMap;
    }

    public void setQueueNumMap(Map<String, Integer> queueNumMap) {
        this.queueNumMap = queueNumMap;
    }

    @Override
    public boolean equals(Object o) {
        if (o == null || getClass() != o.getClass()) return false;
        TopicQueueMap that = (TopicQueueMap) o;
        return Objects.equals(brokerName, that.brokerName) && Objects.equals(queueNumMap, that.queueNumMap);
    }

    @Override
    public int hashCode() {
        return Objects.hash(brokerName, queueNumMap);
    }
}
